import request from '@/utils/request'

// 查询行政区域管理列表
export function ListIMEI(query) {
  return request({
    url: '/system/flats/listimei',
    method: 'get',
    params: query
  })
}

// 查询行政区域管理详细
export function listimeiAll(data) {
  return request({
    url: '/system/flats/listimeiAll',
    method: 'get',
    params: data
  })
}
export function listimeiAll2(data) {
  return request({
    url: '/system/flats/listimeiAll',
    method: 'get',
    params: data
  })
}

// 设备参数list
export function ListDef(data) {
  return request({
    url: `/def/ListDef`,
    method: 'get',
    params: data
  })
}
// 常用参数list
export function ListPud(data) {
  return request({
    url: `/pup/ListPud`,
    method: 'get',
    params: data
  })
}

// 设备list
export function listGroup(data) {
  return request({
    url: '/DevType/ListType',
    method: 'get',
    data: data
  })
}
export function logdata(data) {
  return request({
    url: '/log/Listdata',
    method: 'get',
    params: data
  })
}
// 删除行政区域管理
export function addDev(data) {
  return request({
    url: '/dev/addDev',
    method: 'post',
    data 
  })
}
export function putDev(data) {
  return request({
    url: '/dev/updateDev',
    method: 'put',
    data 
  })
}

export function putdevlist(id){
  return request({
    url: '/parastruct/listparastruct?DevId='+id,
    method: 'get',
    // data 
  })
}

export function deflist(data) {
  return request({
    url: '/def/list',
    method: 'get',
    params: data
  })
}
export function insterDef(data) {
  return request({
    url: '/def/insterDef',
    method: 'post',
    data 
  })
}

export function updateDef(data) {
  return request({
    url: '/def/updateDef',
    method: 'put',
    data 
  })
}

export function deleteDef(data) {
  return request({
    url: '/def/deleteDef',
    method: 'delete',
    params: data
  })
}
export function devTypelist(data) {
  return request({
    url: '/DevType/ListType',
    method: 'get',
    params: data
  })
}
export function devevGroup(data) {
  return request({
    url: '/DevGroup/ListType',
    method: 'get',
    params: data
  })
}

export function devTypeAdd(data) {
  return request({
    url: '/DevType/addType',
    method: 'post',
    data 
  })
}


export function devTypeUpdateType(data) {
  return request({
    url: '/DevType/updateType',
    method: 'put',
    data 
  })
}

export function devTypeDelete(data) {
  return request({
    url: '/DevType/deleteType',
    method: 'delete',
    params: data
  })
}


export function devGroupAdd(data) {
  return request({
    url: '/DevGroup/addType',
    method: 'post',
    data 
  })
}

export function devGroupUpdateType(data) {
  return request({
    url: '/DevGroup/updateType',
    method: 'put',
    data 
  })
}

export function devGroupDelete(data) {
  return request({
    url: '/DevGroup/deleteType',
    method: 'delete',
    params: data
  })
}

